package com.cssy.yd.logic.dao;

import com.cssy.yd.logic.entity.LogicWhCheckDO;
import com.cssy.yd.logic.entity.LogicWhCheckDetailsDO;
import com.plat.helper.SearchConditions;

import java.util.List;
import org.springframework.dao.DataAccessException;

/**
 * 数据访问对象接口
 * @since 2013-09-02
 */
public interface LogicWhCheckDAO {

    /**
     * 插入数据
     * @param logicWhCheckDO
     * @return 插入数据的主键
     */
    public String insertLogicWhCheckDO(LogicWhCheckDO logicWhCheckDO) throws DataAccessException;

    /**
     * 统计记录数
     * @param logicWhCheckDO
     * @return 查出的记录数
     */
    public Integer countLogicWhCheckDOByExample(LogicWhCheckDO logicWhCheckDO) throws DataAccessException;

    /**
     * 更新记录
     * @param logicWhCheckDO
     * @return 受影响的行数
     */
    public Integer updateLogicWhCheckDO(LogicWhCheckDO logicWhCheckDO) throws DataAccessException;

    /**
     * 获取对象列表
     * @param logicWhCheckDO
     * @return 对象列表
     */
    public List<LogicWhCheckDO> findListByExample(LogicWhCheckDO logicWhCheckDO) throws DataAccessException;

    /**
     * 根据主键获取logicWhCheckDO
     * @param id
     * @return logicWhCheckDO
     */
    public LogicWhCheckDO findLogicWhCheckDOByPrimaryKey(String id) throws DataAccessException;

    /**
     * 删除记录
     * @param id
     * @return 受影响的行数
     */
    public Integer deleteLogicWhCheckDOByPrimaryKey(String id) throws DataAccessException;

    public List<LogicWhCheckDO> find(SearchConditions scs) throws DataAccessException;
    
    public Integer count(SearchConditions scs) throws DataAccessException ; 
    
    /**
     * 根据原单号（盘点任务单号）查询最后一次盘点的记录
     * @param oriCode
     * @return
     * @throws DataAccessException
     */
    public LogicWhCheckDO findLastedByOricode(String oriCode) throws DataAccessException;

    /**
     * 查询盘点单据及行项目详细信息
     * @param scs
     * @return
     * @throws DataAccessException
     */
    public List<LogicWhCheckDetailsDO> findListDetatils(SearchConditions scs)
			throws DataAccessException;
    /**
     * 查询盘点单据及行项目详细信息条数用于分页
     * @param scs
     * @return
     * @throws DataAccessException
     */
    public Integer findListDetatilsCount(SearchConditions scs)
			throws DataAccessException;
}